package main

import (
	"time"
	"fmt"
)

func main() {


	timer1:=time.NewTimer(time.Second*2)
	<-timer1.C
	fmt.Println("time 1 expired")

	timer2:=time.NewTimer(time.Second*6)
	go func() {
		fmt.Println("goroutine")
		<-timer2.C
		fmt.Println("time 2 expired")
	}()

	stop2:=timer2.Stop()
	if stop2{
		fmt.Println("timer 2 stopped")
	}

}
